package com.linln.modules.ticket.rule;

/**
 * @author : pengliang
 * @version V1.0
 * @Project: timo
 * @Package com.linln.common.rules
 * @Descriptio /**
 * @Project: timo
 * @Package com.linln.common.rules
 * @Description: TODO
 * @date Date : 2020年11月25日 16:22
 */
public class RuleResult {

    public static RuleResult ok(String msg) {
        return new RuleResult(msg, true);
    }

    public static RuleResult ok() {
        return new RuleResult(true);
    }

    public static RuleResult error(String msg) {
        return new RuleResult(msg, false);
    }

    public RuleResult(String msg, boolean result) {
        this.msg = msg;
        this.result = result;
    }

    public RuleResult(boolean result) {
        this.result = result;
    }

    private String msg;
    private boolean result;

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public boolean getResult() {
        return result;
    }

    public void setResult(boolean result) {
        this.result = result;
    }
}
